package com.suxin.plugin.intergration.manager.finder;

import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Tang
 * @classname CompoundPluginDescriptorFinder
 * @description [  ]
 * @date 2022/7/4 22:28
 */
public class CompoundPluginDescriptorFinder implements PluginDescriptorFinder {

    private List<PluginDescriptorFinder> finders = new ArrayList<>();

    public CompoundPluginDescriptorFinder add(PluginDescriptorFinder finder) {
        if (finder == null) {
            throw new IllegalArgumentException("null not allowed");
        }

        finders.add(finder);

        return this;
    }

    @Override
    public boolean isApplicable(Path pluginPath) {
        return false;
    }

    @Override
    public PluginDescriptor find(Path pluginPath) {
        return null;
    }
}